<!doctype html>
<html style='font-size:24px !important'>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>

<link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&subset=latin,latin-ext' rel='stylesheet' type='text/css' /><style type='text/css'>html {overflow-x: initial !important;}:root { --bg-color:#ffffff; --text-color:#333333; --select-text-bg-color:#B5D6FC; --select-text-font-color:auto; --monospace:"Lucida Console",Consolas,"Courier",monospace; --title-bar-height:20px; }
.mac-os-11 { --title-bar-height:28px; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; inset: 0px; font-size: 1rem; line-height: 1.42857; overflow-x: hidden; background: inherit; tab-size: 4; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; overflow-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 36px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
.typora-export .task-list-item input { pointer-events: none; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
}
#write li > figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; image-orientation: from-image; }
button, input, select, textarea { color: inherit; font: inherit; }
input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgb(85, 85, 85); border-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure > table { margin: 0px; }
thead, tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right: 0px; background-color: inherit; }
.CodeMirror-linenumber { user-select: none; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background: inherit; position: relative !important; }
.md-fences-adv-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
svg { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; background: 0px 0px; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; -webkit-tap-highlight-color: transparent; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li blockquote { margin: 1rem 0px; }
li { margin: 0px; position: relative; }
blockquote > :last-child { margin-bottom: 0px; }
blockquote > :first-child, li > :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; padding-bottom: 0px !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  .typora-export #write { break-after: avoid; }
  .typora-export #write::after { height: 0px; }
  .is-mac table { break-inside: avoid; }
  .typora-export-show-outline .typora-export-sidebar { display: none; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background: rgb(204, 204, 204); display: block; overflow-x: hidden; }
p > .md-image:only-child:not(.md-img-error) img, p > img:only-child { display: block; margin: auto; }
#write.first-line-indent p > .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; }
p > .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
.MathJax_ref { fill: currentcolor; }
[contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item > input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.reversefootnote { font-family: ui-monospace, sans-serif; }
.md-attr { display: none; }
.md-fn-count::after { content: "."; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.6; font-family: var(--monospace); }
code { text-align: left; vertical-align: initial; }
a.md-print-anchor { white-space: pre !important; border-width: initial !important; border-style: none !important; border-color: initial !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; background: 0px 0px !important; text-decoration: initial !important; text-shadow: initial !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: "Segoe UI Symbol", sans-serif; }
.md-diagram-panel > svg { max-width: 100%; }
[lang="flow"] svg, [lang="mermaid"] svg { max-width: 100%; height: auto; }
[lang="mermaid"] .node text { font-size: 1rem; }
table tr th { border-bottom: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }
mark { background: rgb(255, 255, 0); color: rgb(0, 0, 0); }
.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; }
.md-expand mark .md-meta { opacity: 0.3 !important; }
mark .md-meta { color: rgb(0, 0, 0); }
@media print {
  .typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; }
}
.md-diagram-panel .messageText { stroke: none !important; }
.md-diagram-panel .start-state { fill: var(--node-fill); }
.md-diagram-panel .edgeLabel rect { opacity: 1 !important; }
.md-fences.md-fences-math { font-size: 1em; }
.md-fences-advanced:not(.md-focus) { padding: 0px; white-space: nowrap; border: 0px; }
.md-fences-advanced:not(.md-focus) { background: inherit; }
.typora-export-show-outline .typora-export-content { max-width: 1440px; margin: auto; display: flex; flex-direction: row; }
.typora-export-sidebar { width: 300px; font-size: 0.8rem; margin-top: 80px; margin-right: 18px; }
.typora-export-show-outline #write { --webkit-flex:2; flex: 2 1 0%; }
.typora-export-sidebar .outline-content { position: fixed; top: 0px; max-height: 100%; overflow: hidden auto; padding-bottom: 30px; padding-top: 60px; width: 300px; }
@media screen and (max-width: 1024px) {
  .typora-export-sidebar, .typora-export-sidebar .outline-content { width: 240px; }
}
@media screen and (max-width: 800px) {
  .typora-export-sidebar { display: none; }
}
.outline-content li, .outline-content ul { margin-left: 0px; margin-right: 0px; padding-left: 0px; padding-right: 0px; list-style: none; }
.outline-content ul { margin-top: 0px; margin-bottom: 0px; }
.outline-content strong { font-weight: 400; }
.outline-expander { width: 1rem; height: 1.42857rem; position: relative; display: table-cell; vertical-align: middle; cursor: pointer; padding-left: 4px; }
.outline-expander::before { content: ""; position: relative; font-family: Ionicons; display: inline-block; font-size: 8px; vertical-align: middle; }
.outline-item { padding-top: 3px; padding-bottom: 3px; cursor: pointer; }
.outline-expander:hover::before { content: ""; }
.outline-h1 > .outline-item { padding-left: 0px; }
.outline-h2 > .outline-item { padding-left: 1em; }
.outline-h3 > .outline-item { padding-left: 2em; }
.outline-h4 > .outline-item { padding-left: 3em; }
.outline-h5 > .outline-item { padding-left: 4em; }
.outline-h6 > .outline-item { padding-left: 5em; }
.outline-label { cursor: pointer; display: table-cell; vertical-align: middle; text-decoration: none; color: inherit; }
.outline-label:hover { text-decoration: underline; }
.outline-item:hover { border-color: rgb(245, 245, 245); background-color: var(--item-hover-bg-color); }
.outline-item:hover { margin-left: -28px; margin-right: -28px; border-left: 28px solid transparent; border-right: 28px solid transparent; }
.outline-item-single .outline-expander::before, .outline-item-single .outline-expander:hover::before { display: none; }
.outline-item-open > .outline-item > .outline-expander::before { content: ""; }
.outline-children { display: none; }
.info-panel-tab-wrapper { display: none; }
.outline-item-open > .outline-children { display: block; }
.typora-export .outline-item { padding-top: 1px; padding-bottom: 1px; }
.typora-export .outline-item:hover { margin-right: -8px; border-right: 8px solid transparent; }
.typora-export .outline-expander::before { content: "+"; font-family: inherit; top: -1px; }
.typora-export .outline-expander:hover::before, .typora-export .outline-item-open > .outline-item > .outline-expander::before { content: "−"; }
.typora-export-collapse-outline .outline-children { display: none; }
.typora-export-collapse-outline .outline-item-open > .outline-children, .typora-export-no-collapse-outline .outline-children { display: block; }
.typora-export-no-collapse-outline .outline-expander::before { content: "" !important; }
.typora-export-show-outline .outline-item-active > .outline-item .outline-label { font-weight: 700; }
.md-inline-math-container mjx-container { zoom: 0.95; }
mjx-container { break-inside: avoid; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background: inherit; }
.CodeMirror-scroll { overflow: auto hidden; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right: 1px solid rgb(221, 221, 221); background: inherit; white-space: nowrap; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background: inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background: inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; outline: 0px; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: auto hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 10px; z-index: 3; overflow-y: hidden; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; background: 0px 0px !important; border: none !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-radius: 0px; border-width: 0px; background: 0px 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; overflow-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; }
.CodeMirror-wrap pre { overflow-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right: 30px solid transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right: none; width: auto; }
.CodeMirror-linebackground { position: absolute; inset: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background: rgba(255, 255, 0, 0.4); }
span.cm-underlined { text-decoration: underline; }
span.cm-strikethrough { text-decoration: line-through; }
.cm-tw-syntaxerror { color: rgb(255, 255, 255); background-color: rgb(153, 0, 0); }
.cm-tw-deleted { text-decoration: line-through; }
.cm-tw-header5 { font-weight: 700; }
.cm-tw-listitem:first-child { padding-left: 10px; }
.cm-tw-box { border-style: solid; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-color: inherit; border-top-width: 0px !important; }
.cm-tw-underline { text-decoration: underline; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&subset=latin,latin-ext);

/* open-sans-regular - latin-ext_latin */
  /* open-sans-italic - latin-ext_latin */
    /* open-sans-700 - latin-ext_latin */
    /* open-sans-700italic - latin-ext_latin */
  html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: "Open Sans","Clear Sans", "Helvetica Neue", Helvetica, Arial, 'Segoe UI Emoji', sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}

@media only screen and (min-width: 1400px) {
	#write {
		max-width: 1024px;
	}
}

@media only screen and (min-width: 1800px) {
	#write {
		max-width: 1200px;
	}
}

#write > ul:first-child,
#write > ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}

/*@media print {
    .typora-export h1,
    .typora-export h2 {
        border-bottom: none;
        padding-bottom: initial;
    }

    .typora-export h1::after,
    .typora-export h2::after {
        content: "";
        display: block;
        height: 100px;
        margin-top: -96px;
        border-top: 1px solid #eee;
    }
}*/

h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li>ol,
li>ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    margin: 0;
    padding: 6px 13px;
}
table td {
    border: 1px solid #dfe2e5;
    margin: 0;
    padding: 6px 13px;
}
table th:first-child,
table td:first-child {
    margin-top: 0;
}
table th:last-child,
table td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item > input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    pre {
        page-break-inside: avoid;
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block>.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write>h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write>h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write>h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write>h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image>.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: "Segoe UI", "Arial", sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

/*.html-for-mac {
    --item-hover-bg-color: #E6F0FE;
}*/

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
    opacity: 0.4;
}

.ty-preferences .window-content {
    background-color: #fafafa;
}

.ty-preferences .nav-group-item.active {
    color: white;
    background: #999;
}

.menu-item-container a.menu-style-btn {
    background-color: #f5f8fa;
    background-image: linear-gradient( 180deg , hsla(0, 0%, 100%, 0.8), hsla(0, 0%, 100%, 0)); 
}



</style><title>微机原理课后作业20221201</title>
</head>
<body class='typora-export os-windows'><div class='typora-export-content'>
<div id='write'  class=''><h3 id='第一章节'><span>第一章节</span></h3><h4 id='p18--11将下列十进制数转换成二进制数-重点'><mark><span>P18</span></mark><span>  1.1将下列十进制数转换成二进制数 </span><mark><span>重点</span></mark></h4><h5 id='5）113'><span>（5）11.3</span></h5><p><span>11=1011B</span></p><p><span>0.3=0.01001 1001 1001B   </span></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images1.png" alt="1" style="zoom:80%;" /></p><p><span>假如要求取4位小数，则0.3=0.0100B</span>
<span>11.3=1011.0100B</span></p><h5 id='6）511'><span>（6）511 </span></h5><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images2.png" alt="2" style="zoom:80%;" /></p><h4 id='12将下列二进制数转换成十六进制数'><span>1.2将下列二进制数转换成十六进制数</span></h4><p><span>（2）1101 0010 11B   </span></p><p>&nbsp;</p><p><span>（4）0100 0000 1010 1B</span></p><p>&nbsp;</p><p><span>（5）01111111.11B</span></p><p>&nbsp;</p><h4 id='13-将下列十六进制数转换成二进制数和十进制数---重点'><span>1.3 将下列十六进制数转换成二进制数和十进制数   </span><mark><span>重点</span></mark></h4><p><span>（1）78H</span></p><p>&nbsp;</p><p><span>（2）0A6H</span></p><p>&nbsp;</p><h4 id='18-已知a0011-1000bb1100-0111b计算下列逻辑运算重点'><span>1.8 已知a=0011 1000B，b=1100 0111B，计算下列逻辑运算：</span><mark><span>重点</span></mark></h4><p><span>（1）a AND b</span></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images3.png" alt="3" style="zoom:67%;" /></p><p><span>（2）a OR b</span></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images4.png" alt="4" style="zoom:67%;" /></p><p><span>（3）a XOR b</span></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images5.png" alt="5" style="zoom:67%;" /></p><p><span>（4）NOT a</span></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images6.png" alt="6" style="zoom:67%;" /></p><p>&nbsp;</p><h4 id='19-设机器字长为8位写出下列各数的原码和补码'><span>1.9 设机器字长为8位，写出下列各数的原码和补码：</span></h4><p><span>（1）+ 101 0101B</span></p><p>&nbsp;</p><p><span>（2）-101 0101B</span></p><p>&nbsp;</p><p><span>（5）+100 0000B</span></p><p>&nbsp;</p><p><span>（6）-100 0000B</span></p><p>&nbsp;</p><h4 id='111-设机器字长为8位已知下列两组为a和b的原码求ab补和a-b补并判断结果是否溢出重点'><span>1.11 设机器字长为8位，已知下列两组为a和b的原码，求[a+b]补和[a-b]补，并判断结果是否溢出？</span><mark><span>重点</span></mark></h4><p><span>（1）[a]原=1110 1011B， [b]原=0100 1010B</span></p><p><span>负数的补码求解：（1）原码除最高位取反 （2）加1</span></p><p><span> [a]补=1001 0101B</span></p><p><span>b为正数，补码等于原码， [b]补=0100 1010B</span></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images7.png" alt="7" style="zoom:67%;" /></p><h4 id='115-设下列4组为8位二进制补码表示的十六进制数计算ab和a-b并判断结果是否溢出'><span>1.15 设下列4组为8位二进制补码表示的十六进制数，计算a+b和a-b，并判断结果是否溢出？</span></h4><p><span>（4） [a]补= 37H, [b]补= 0C7H, a+b= [a]补+ [b]补</span></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images8.png" alt="8" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images9.png" alt="9" style="zoom:67%;" /></p><h4 id='补充内容'><span>补充内容 </span></h4><p><span>十进制数66.5转换成八进制数是</span></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images10.png" alt="10" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images11.png" alt="11" style="zoom:67%;" /></p><h3 id='第二章节'><span>第二章节</span></h3><h4 id='p31-21微处理器内部结构由哪几部分组成阐述各部分的主要功能'><mark><span>P31</span></mark><span> 2.1微处理器内部结构由哪几部分组成？阐述各部分的主要功能？</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images12.png" alt="12" style="zoom:67%;" /></p><p><span>（1）算术逻辑单元ALU：完成所有的运算操作；</span>
<span>（2）工作寄存器：暂存寻址信息咍计算过程中的中间结果；</span>
<span>（3）控制器：完成指令的读入、寄存和译码，并产生控制序列，使ALU 完成指定操作；</span>
<span>（4）I/O 控制逻辑：处理I/O 操作。</span></p><h4 id='26-80868088-微处理器内部有哪些寄存器重点'><span>2.6 8086/8088 微处理器内部有哪些寄存器？</span><mark><span>重点</span></mark></h4><p><span>	</span><span> 8086CPU内部有14个16位寄存器，其中8个通用寄存器（</span><mark><span>4 个数据寄存器</span></mark><span>AX、BX、CX、DX，4个地址指针/变址寄存器SI、DI、SP、BP），4个段寄存器（CS、DS、ES、SS），2 个控制寄存器（指令指针IP，微处理器状态字PSW）。</span></p><h4 id='211将十六进制数62a0h与下列各数相加求出其结果及标志位cfafsfzfof和pf的值重点'><span>2.11将十六进制数62A0H与下列各数相加，求出其结果及标志位CF、AF、SF、ZF、OF、和PF的值：</span><mark><span>重点</span></mark></h4><p><span>（3）CFA0H</span></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images13.png" alt="13" style="zoom:80%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images14.png" alt="14" style="zoom:67%;" /></p><h4 id='214-写出下列存储器地址的段地址偏移地址和物理地址--重要'><span>2.14 写出下列存储器地址的段地址、偏移地址和物理地址：  </span><mark><span>重要</span></mark></h4><h5 id='1）213410a0'><span>（1）2134:10A0</span></h5><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images15.png" alt="15" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images16.png" alt="16" style="zoom:67%;" /></p><h4 id='215-给定一个数据的有效地址为2359h并且ds490bh求该数据的物理地址重点'><span>2.15 给定一个数据的有效地址为2359H，并且(DS)=490BH，求该数据的物理地址。</span><mark><span>重点</span></mark></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images17.png" alt="17" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images18.png" alt="18" style="zoom:67%;" /></p><h4 id='216-在存储器有一块254b的连续存储区域设其末单元的逻辑地址为1412f2bc写出这个存储区域首末字节单元的物理地址'><span>2.16 在存储器有一块254B的连续存储区域，设其末单元的逻辑地址为1412：F2BC，写出这个存储区域首末字节单元的物理地址。</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images19.png" alt="19" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images20.png" alt="20" style="zoom:67%;" /></p><h3 id='第三章节'><span>第三章节</span></h3><h4 id='p54-31写出完成下列要求的变量定义语句'><mark><span>P54</span></mark><span> 3.1.写出完成下列要求的变量定义语句。</span></h4><h5 id='1）在变量var1中保存6个字变量4512h-4512--1-1003-10h-65550'><span>（1）在变量var1中保存6个字变量：4512H, 4512, -1, 100/3, 10H, 65550;</span></h5><p><span>var1 DW 4512H, 4512,-1,100/3, 10H,65530</span></p><h5 id='2）在变量var2中保存字符串bytewordword'><span>（2）在变量var2中保存字符串：&#39;BYTE&#39;,&#39;WORD&#39;,&#39;word&#39;;</span></h5><p><span>var2 DB ’BYTE’,’word’,’WORD’</span></p><h5 id='4）在缓冲区buf2中保存5字节的55h再保存10字节的240并将这一过程重复7'><span>（4）在缓冲区buf2中，保存5字节的55H,再保存10字节的240,并将这一过程重复7</span></h5><p><span>buf2 DB 7 DUP (5 DUP（55H),10 DUP (240))</span></p><h4 id='32-设变量-var1-的逻辑地址为01000000画出下列语句定义的变量的存储分配图'><span>3.2 设变量 var1 的逻辑地址为0100：0000，画出下列语句定义的变量的存储分配图：</span></h4><h5 id='var1-db-12－122064-dup055h）'><span>var1 DB 12，－12，20/6，4 DUP（0，55H）</span></h5><h5 id='var2-db-assemble'><span>var2 DB ‘Assemble’</span></h5><h5 id='var3-dw-ab-cde'><span>var3 DW ‘AB’, ‘cd’,‘E’</span></h5><h5 id='var4-dw-var2'><span>var4 DW var2</span></h5><h5 id='var5-dd-var2'><span>var5 DD var2</span></h5><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images21.png" alt="21" style="zoom:80%;" /></p><h4 id='33-已知下列一组语句-2022年10月18号-大班讲解'><span>3.3 已知下列一组语句： </span><mark><span>2022年10月18号 大班讲解</span></mark></h4><h5 id='org\t1000h'><span>ORG</span><span>	</span><span>1000H</span></h5><h5 id='var\tdw\t34a12h'><span>VAR</span><span>	</span><span>DW</span><span>	</span><span>3,$+4,’A’,12H</span></h5><h5 id='cnt\tequ\t-var'><span>CNT</span><span>	</span><span>EQU</span><span>	</span><span>$-VAR</span></h5><h5 id='db\t2030bhcnt1fh'><span>DB</span><span>	</span><span>20/3,0BH,CNT,1FH</span></h5><h5 id='画出内存分配图'><span>画出内存分配图</span></h5><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images22.png" alt="22" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images23.png" alt="23" style="zoom:67%;" /></p><h4 id='34-写出下列mov指令中源操作数的寻址方式设var1为字型变量n为常数）重点'><span>3.4 写出下列MOV指令中源操作数的寻址方式（设VAR1为字型变量,N为常数）。</span><mark><span>重点</span></mark></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images24.png" alt="24" style="zoom:67%;" /></p><h4 id='第四章节'><span>第四章节</span></h4><h4 id='p140-43-设ds）＝2000hbx）＝0100hsi）＝0002h20100）＝3412h20102）＝7856h21200）＝4c2ah21202）＝65b7h求下列指令执行后ax寄存器的内容'><span>P140 4.3 设（DS）＝2000H，（BX）＝0100H，（SI）＝0002H，（20100）＝3412H，（20102）＝7856H，（21200）＝4C2AH，（21202）＝65B7H，求下列指令执行后AX寄存器的内容。</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images25.png" alt="25" style="zoom:67%;" /></p><h4 id='44-执行下列指令后dx寄存器中的内容是多少'><span>4.4 执行下列指令后，DX寄存器中的内容是多少？</span></h4><h5 id='-1'><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images26.png" alt="26" style="zoom:80%;" /></h5><h4 id='45-如果堆栈的起始地址为22000000栈底为0100hsp）＝00a8h求'><span>4.5 如果堆栈的起始地址为2200:0000，栈底为0100H，（SP）＝00A8H，求:</span></h4><h5 id='1）栈顶地址'><span>（1）栈顶地址；</span></h5><h5 id='2）ss的内容'><span>（2）SS的内容；</span></h5><h5 id='3）再存入数据5678h3af2h后sp的内容'><span>（3）再存入数据5678H，3AF2H后，SP的内容。</span></h5><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images27.png" alt="27" style="zoom:67%;" /></p><h4 id='48-按下列要求写出指令重点'><span>4.8 按下列要求写出指令。</span><mark><span>重点</span></mark></h4><h5 id='1）将ax寄存器的低4位清零其余位不变'><span>（1）将AX寄存器的低4位清零，其余位不变；</span></h5><p><span>	</span><span>AND  AX，0FFF0H </span></p><h5 id='2）将bx寄存器的低4位置1其余位不变'><span>（2）将BX寄存器的低4位置1，其余位不变；</span></h5><p><span>	</span><span>OR  AX，000FH </span></p><h5 id='3）将al寄存器的低4位保持不变高4位取反'><span>（3）将AL寄存器的低4位保持不变，高4位取反；</span></h5><p><span>	</span><span>XOR</span><span>	</span><span>AL，0F0H</span></p><h5 id='4）测试bx中的位1和位2当这两位同时为0时将al置0ffh否则al清零'><span>（4）测试BX中的位1和位2，当这两位同时为0时将AL置0FFH，否则AL清零；</span></h5><h5 id='-2'><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images28.png" alt="28" style="zoom: 50%;" /></h5><h5 id='5）测试bx中的位1和位2当这两位有一位为0时将al置0ffh否则al清零'><span>（5）测试BX中的位1和位2，当这两位有一位为0时将AL置0FFH，否则AL清零</span></h5><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images29.png" alt="29" style="zoom:50%;" /></p><h5 id='6）将al中保存的字母ascii码变换成相应的大写字母的ascii码'><span>（6）将AL中保存的字母ASCII码变换成相应的大写字母的ASCII码；</span></h5><p><span>         AND AL，5FH                     SUB AL,20H</span></p><h5 id='7）将al中保存的字母ascii码变换成相应的小写字母的ascii码'><span>（7）将AL中保存的字母ASCII码变换成相应的小写字母的ASCII码；</span></h5><p><span>		</span><span>OR AL，20H        ADD AL,20H  </span></p><h5 id='8）将ax中的各位取反'><span>（8）将AX中的各位取反；</span></h5><p><span>		</span><span>XOR   AX，0FFFFH</span><span>	</span><span>或者</span><span>	</span><span>NOT</span><span>	</span><span>AX         </span></p><h5 id='9）将dx中的低7位取反高9位不变'><span>（9）将DX中的低7位取反，高9位不变； </span></h5><p><span>		</span><span>XOR  DX，007FH        </span></p><h5 id='10）将cx中的低8位与高8位互换'><span>（10）将CX中的低8位与高8位互换。</span></h5><p><span>		</span><span>XCHG</span><span>	</span><span>CH，CL</span></p><h4 id='49-写出完成下述功能的程序段'><span>4.9 写出完成下述功能的程序段：</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images30.png" alt="30" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images31.png" alt="31" style="zoom:67%;" /></p><h4 id='415-设bx1011-1011b变量var的内容为0011-0010b求下列指令单独执行后bx的内容'><span>4.15 设(BX)=1011 1011B，变量VAR的内容为0011 0010B，求下列指令单独执行后BX的内容。</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images32.png" alt="32" style="zoom:67%;" /></p><h3 id='第五章节'><span>第五章节</span></h3><h4 id='8086cpu系统复位信号至少保持4个时钟周期的高电平上电复位后csffffh-ip0000h-执行的第一条命令的物理地址是-ffff0h--重点'><span>8086CPU系统复位信号至少保持4个时钟周期的高电平，上电复位后CS=</span><u><span>FFFFH</span></u><span> ，IP=</span><u><span>0000H</span></u><span> ，执行的第一条命令的物理地址是 </span><u><span>FFFF0H</span></u><span>。  </span><mark><span>重点</span></mark></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images33.png" alt="33" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images34.png" alt="34" style="zoom:80%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images35.png" alt="35" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images36.png" alt="36" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images37.png" alt="37" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images38.png" alt="38" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images39.png" alt="39" style="zoom:67%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images40.png" referrerpolicy="no-referrer" alt="40"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images41.png" referrerpolicy="no-referrer" alt="41"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images42.png" referrerpolicy="no-referrer" alt="42"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images43.png" referrerpolicy="no-referrer" alt="43"></p><h3 id='第六章节'><span>第六章节</span></h3><h4 id='p210-610-利用全地址译码将6264芯片接在8088的系统总线上其所占地址范围为00000h03fffh试画连接图写入某数据并读出与之比较若有错则在dl-中写入01h若每个单元均对则在dl写入eeh试编写此检测程序\t重点'><span>P210 6.10 利用全地址译码将6264芯片接在8088的系统总线上，其所占地址范围为00000H~03FFFH，试画连接图。写入某数据并读出与之比较，若有错，则在DL 中写入01H；若每个单元均对，则在DL写入EEH，试编写此检测程序。</span><span>	</span><mark><span>重点</span></mark></h4><h5 id='利用全地址译码将6264-芯片接在8088-的系统总线上-其所占地址范围为00000h03fffh第一片6264的寻址范围为00000-01fffh第二片6264的寻址范围为02000-03fffh'><span>利用全地址译码将6264 芯片接在8088 的系统总线上， 其所占地址范围为00000H~03FFFH。第一片6264的寻址范围为00000-01FFFH，第二片6264的寻址范围为02000-03FFFH</span></h5><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images44.png" alt="44" style="zoom:80%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images45.png" alt="45" style="zoom:80%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images46.png" alt="46" style="zoom:80%;" /></p><p>&nbsp;</p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="assembly" style="break-inside: unset;"><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang="assembly"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 15.2786px; left: 7.99481px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">AX</span>,0</span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">DS</span>,<span class="cm-variable">AX</span> <span class="cm-comment">; 得到段地址</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">SI</span>,0<span class="cm-comment">;  得到偏移地址</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">CX</span>,16*1024<span class="cm-comment">; 循环次数为16K，为寻址空间</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">AL</span>,55H</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag">CHECK:</span> MOV [<span class="cm-variable">SI</span>],AL</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">CMP</span> [<span class="cm-variable">SI</span>],AL</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">JAE</span> <span class="cm-keyword">ERROR</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">INC</span> <span class="cm-variable">SI</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">LOOP</span> <span class="cm-keyword">CHECK</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">DL</span>,0EEH</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">JMP</span> <span class="cm-keyword">NEXT</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag">ERROR:</span> <span class="cm-keyword">MOV</span> <span class="cm-keyword">DL</span>,01H </span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag">NEXT:</span> …</span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 484px;"></div><div class="CodeMirror-gutters" style="display: none; height: 484px;"></div></div></div></pre><p>&nbsp;</p><h4 id='618-在8086-cpu-工作在最小方式组成的微机系统中扩充设计16kb-的sram-电路sram-芯片选用intel-6264内存地址范围为70000h73fffh试画出此sram-电路与8086-系统总线的连接图'><span>6.18 在8086 CPU 工作在最小方式组成的微机系统中，扩充设计16kB 的SRAM 电路，SRAM 芯片选用Intel 6264,内存地址范围为70000H~73FFFH，试画出此SRAM 电路与8086 系统总线的连接图。</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images47.png" referrerpolicy="no-referrer" alt="47"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images48.png" referrerpolicy="no-referrer" alt="48"></p><h3 id='第七章节'><span>第七章节</span></h3><h4 id='p242-77--8086-cpu-有-20-条地址总线可形成-1mb-的存储器地址空间可寻址范围为00000h---fffffh地址总线中的-16-条线可用于io-寻址形成-64kb-的输入输出地址空间地址范围为-0000h--ffffh-pc机中用了10条地址线进行io-操作其地址空间为-1kb-可寻址范围为-000h-3ffh--重点'><span>P242 7.7  8086 CPU 有 </span><u><span>20</span></u><span> 条地址总线,可形成 </span><u><span>1MB</span></u><span> 的存储器地址空间,可寻址范围为</span><u><span>00000H - FFFFFH</span></u><span>;地址总线中的 </span><u><span>16</span></u><span> 条线可用于I/O 寻址,形成 </span><u><span>64KB</span></u><span> 的输入输出地址空间,地址范围为 </span><u><span>0000H -FFFFH</span></u><span> ;PC机中用了10条地址线进行I/O 操作,其地址空间为 1KB ,可寻址范围为 000H-3FFH。  </span><mark><span>重点</span></mark></h4><h4 id='723-在8088-cpu-工作在最小大方式组成的微机系统中利用74ls244设计一个输入端口分配给该端口的地址为04e5h试画出连接图'><span>7.23 在8088 CPU 工作在最小(大)方式组成的微机系统中，利用74LS244设计一个输入端口，分配给该端口的地址为04E5H，试画出连接图。</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images49.png" referrerpolicy="no-referrer" alt="49"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images50.png" referrerpolicy="no-referrer" alt="50"></p><h4 id='724--在上题的基础上利用74ls374设计一个输出端口分配给该端口的地址为e504h试画出连接图若上题中输入端口的bit3bit4和bit7同时为1将内存buffer开始的连续10个字节单元的数据由e504h端口输出若不满足条件则等待试编写程序'><span>7.24  在上题的基础上，利用74LS374设计一个输出端口，分配给该端口的地址为E504H，试画出连接图。若上题中输入端口的bit3、bit4和bit7同时为1，将内存BUFFER开始的连续10个字节单元的数据由E504H端口输出；若不满足条件，则等待。试编写程序。</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images51.png" referrerpolicy="no-referrer" alt="51"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images52.png" referrerpolicy="no-referrer" alt="52"></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="assembly" style="break-inside: unset;"><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang="assembly"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 15.2786px; left: 7.99481px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> &nbsp;<span class="cm-variable">CX</span> ,10<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>循环次数10</span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">LEA</span> &nbsp;<span class="cm-variable">SI</span>,BUFFER<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	"> </span><span class="cm-tab" role="presentation" cm-text="	">    </span>得到BUFFER的有效地址，给SI</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> &nbsp;<span class="cm-variable">DX</span>,04E5H<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-tab" role="presentation" cm-text="	">    </span>得到74LS244的地址</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;">WAIT1：IN  AL,<span class="cm-variable">DX</span><span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">    </span>读取74LS244管脚值，存放在AL中</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">AND</span> &nbsp;<span class="cm-keyword">AL</span>,98H<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>bit3、bit4、bit7保持不变，其余清零</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">CMP</span> &nbsp;<span class="cm-keyword">AL</span>,98H<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>AL与98H比较，相当于AL=AL-98H</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">JNZ</span> &nbsp;<span class="cm-keyword">WAIT1</span><span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	"> </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>如果AL不等于0，跳转到WAIT1，否则，顺序执行</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,0E504H<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-tab" role="presentation" cm-text="	">    </span>得到74LS245的地址</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;">L1：MOV  AL,[<span class="cm-variable">SI</span>]<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">    </span>把BUFFER的第一个字节给AL</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">OUT</span> &nbsp; <span class="cm-variable">DX</span>,AL<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>输出第一个字节</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">INC</span> &nbsp; &nbsp;<span class="cm-variable">SI</span><span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>SI指向BUFFER的第二个字节（循环1次时）</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">LOOP</span> &nbsp;<span class="cm-keyword">L1</span><span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">   </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>循环次数为CX的值，10次</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">HLT</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 484px;"></div><div class="CodeMirror-gutters" style="display: none; height: 484px;"></div></div></div></pre><p>&nbsp;</p><h4 id='725-在8086最大系统中分别利用2片74ls244和74ls273设计16位输入和输出接口其起始端口地址为504h506h画出硬件连接图了解'><span>7.25 在8086最大系统中，分别利用2片74LS244和74LS273设计16位输入和输出接口，其起始端口地址为504H、506H，画出硬件连接图。</span><mark><span>了解</span></mark></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images53.png" referrerpolicy="no-referrer" alt="53"></p><h3 id='第九章节'><span>第九章节</span></h3><h4 id='p300-98-在8088最小系统中8253的端口地址为284h～287h系统提供的时钟为1mhz要求在out0输出周期为20微秒的方波在out1输出周期为200微秒其中每周期为负的时间是180微秒的信号请编写8253的初始化程序'><span>P300 9.8 在8088最小系统中，8253的端口地址为284H～287H。系统提供的时钟为1MHz，要求在OUT0输出周期为20微秒的方波，在OUT1输出周期为200微秒，其中每周期为负的时间是180微秒的信号。请编写8253的初始化程序。</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images54.png" referrerpolicy="no-referrer" alt="54"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images55.png" alt="55" style="zoom:80%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images56.png" alt="56" style="zoom:80%;" /></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images57.png" referrerpolicy="no-referrer" alt="57"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images58.png" referrerpolicy="no-referrer" alt="58"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images59.png" referrerpolicy="no-referrer" alt="59"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images60.png" referrerpolicy="no-referrer" alt="60"></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="assembly" style="break-inside: unset;"><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang="assembly"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 15.2786px; left: 7.99481px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-comment">;2个计数器，则需要2个3步走，当时长为八位时候，可以省略3步走的第3步（写入高8位时常数）</span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-comment">;计数器0时常数N0=20，20可以用8位表示，所以读写规则设置为01</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,287H<span class="cm-comment">; <span class="cm-tab" role="presentation" cm-text="	">   </span><span class="cm-tab" role="presentation" cm-text="	">    </span>控制字端口地址</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">AL</span>,00010110B <span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">  </span>方式3产生方波</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">OUT</span> <span class="cm-variable">DX</span>,AL<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>完成3步走的第1步</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,284H<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>计数器0端口地址</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">AL</span>,20<span class="cm-comment">; <span class="cm-tab" role="presentation" cm-text="	"> </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>写计数器0时常数</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">OUR</span> <span class="cm-variable">DX</span>,AL<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>完成3步走的第2步</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,287<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	"> </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>写计数器1控制方式字</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">AL</span>,01010100B<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">   </span>方式2 产生周期信号，低电平1*Tclk1</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">OUT</span> <span class="cm-variable">DX</span>,AL<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>完成3步走的第1步</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,285H<span class="cm-comment">; <span class="cm-tab" role="presentation" cm-text="	">   </span><span class="cm-tab" role="presentation" cm-text="	">    </span>实常数为10，则可以用8位表示</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">AL</span>,<span class="cm-tab" role="presentation" cm-text="	"> </span>10<span class="cm-comment">; <span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>高电平(N-1)*Tclk1=9Tclk1</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-keyword">OUT</span> <span class="cm-variable">DX</span>,AL<span class="cm-comment">;<span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-tab" role="presentation" cm-text="	">    </span>完成3步走的第2步</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 518px;"></div><div class="CodeMirror-gutters" style="display: none; height: 518px;"></div></div></div></pre><p>&nbsp;</p><h3 id='第十章节'><span>第十章节</span></h3><h4 id='1012-如果-8255a-的端口地址为300h～303ha-组和b-组均为方式0端口a-为输出端口b为输入pc3～pc0-为输入pc7～pc4-为输出写出8255a-的初始化程序段编程实现将从端口c-低4-位读入的值从高4-位送出'><span>10.12 如果 8255A 的端口地址为300H～303H，A 组和B 组均为方式0，端口A 为输出，端口B为输入，PC3～PC0 为输入，PC7～PC4 为输出，写出8255A 的初始化程序段；编程实现将从端口C 低4 位读入的值从高4 位送出。</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images61.png" referrerpolicy="no-referrer" alt="61"></p><pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="assembly"><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang="assembly"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 15.2786px; left: 7.99481px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-comment">; 8255三步走就是（1）对控制字写入；（2）读入端口数据；（3）写入端口数据。  总结就是 写、读、写</span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,0303H<span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-comment">;控制字端口地址</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">AL</span>,10000011B；<span class="cm-comment">;根据上图写入方式，输入输出口</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">OUT</span><span class="cm-tab" role="presentation" cm-text="	"> </span><span class="cm-variable">DX</span>,AL <span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-comment">;写入固定模式</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,0302H<span class="cm-comment">; 找到C口的地址</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">IN</span><span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-keyword">AL</span>,<span class="cm-variable">DX</span><span class="cm-tab" role="presentation" cm-text="	">   </span><span class="cm-comment">;读取C口的数据</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">CL</span>,4 &nbsp; &nbsp;<span class="cm-comment">;需要左移4次</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">SHL</span> <span class="cm-keyword">AL</span>,CL <span class="cm-tab" role="presentation" cm-text="	">  </span><span class="cm-comment">;逻辑左移</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,0302H<span class="cm-comment">; 可以省略</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">OUT</span> <span class="cm-variable">DX</span>,AL &nbsp; <span class="cm-comment">; C口写入数据</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 415px;"></div><div class="CodeMirror-gutters" style="display: none; height: 415px;"></div></div></div></pre><h4 id='1013-在实际应用中经常需要检测设备的状态并进行指示在-8086-最小方式系统下有一片8255a其分配的端口地址为8f00h～8f07h-中的奇地址外部设备产生的状态有16个k15～k0）要求采用4-个发光二极管来指示开关量中1的个数1）画出8255a的连接图2）编写程序段实现连续检测并显示'><span>10.13 在实际应用中经常需要检测设备的状态，并进行指示。在 8086 最小方式系统下，有一片8255A，其分配的端口地址为8F00H～8F07H 中的奇地址，外部设备产生的状态有16个（K15～K0），要求采用4 个发光二极管来指示开关量中“1”的个数。（1）画出8255A的连接图；（2）编写程序段实现连续检测并显示。</span></h4><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images62.png" referrerpolicy="no-referrer" alt="62"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images63.png" referrerpolicy="no-referrer" alt="63"></p><p><img src="https://zf-1258939971.cos.ap-chengdu.myqcloud.com/images61.png" referrerpolicy="no-referrer" alt="61"></p><pre class="md-fences md-end-block ty-contain-cm md-focus" spellcheck="false" lang="assembly" style="break-inside: unset;"><div class="CodeMirror cm-s-inner cm-s-null-scroll CodeMirror-wrap" lang="assembly"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 15.2786px; left: 7.99481px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style=""><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: 0px; width: 0px;"></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-comment">; 8255三步走就是（1）对控制字写入；（2）读入端口数据；（3）写入端口数据。  总结就是 写、读、写</span></span></pre></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,8F07H &nbsp; &nbsp; &nbsp;<span class="cm-comment">;1 控制方式的写入</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">AL</span>,10010010B</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">OUT</span><span class="cm-tab" role="presentation" cm-text="	"> </span><span class="cm-variable">DX</span>,AL</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag">REPEAT:</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,8F03H</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">IN</span> <span class="cm-keyword">AL</span>,<span class="cm-variable">DX</span><span class="cm-comment">;读取B口的开关量</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">XCHG</span> <span class="cm-keyword">AL</span>,AH</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,8F01H</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">IN</span> <span class="cm-keyword">AL</span>,<span class="cm-variable">DX</span><span class="cm-comment">;读取A口的开关量</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">XCHG</span> <span class="cm-keyword">AL</span>,AH</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">BL</span><span class="cm-tag">=0</span><span class="cm-comment">; 记录开关量中“1”的个数</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">CLC</span> &nbsp;<span class="cm-comment">;清除Cy标志位</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">CX</span>,16</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag">L1:</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-keyword">SHR</span><span class="cm-tab" role="presentation" cm-text="	"> </span><span class="cm-variable">AX</span>,1 &nbsp; <span class="cm-comment">;逻辑右移，为了把最低位给cy</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-keyword">ADC</span> <span class="cm-keyword">BL</span>,0 &nbsp; <span class="cm-comment">;带进位的加法，相当于BL=BL+0+Cy</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tab" role="presentation" cm-text="	">    </span><span class="cm-keyword">LOOP</span> <span class="cm-keyword">L1</span> &nbsp; &nbsp;<span class="cm-comment">;循环的次数为CX，16次</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" class="cm-tab-wrap-hack" style="padding-right: 0.1px;"><span class="cm-tab" role="presentation" cm-text="	">    </span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-variable">DX</span>,8F07H &nbsp; &nbsp; &nbsp;<span class="cm-comment">;3 C口写入</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">MOV</span> <span class="cm-keyword">AL</span>,BL &nbsp;<span class="cm-comment">; 把开关量中“1”的个数给AL</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">OUT</span><span class="cm-tab" role="presentation" cm-text="	"> </span><span class="cm-variable">DX</span>,AL</span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-keyword">JMP</span> <span class="cm-keyword">REPEAT</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span cm-text="" cm-zwsp="">
</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 933px;"></div><div class="CodeMirror-gutters" style="display: none; height: 933px;"></div></div></div></pre></div></div>
</body>
</html>